import App from './App'
import api from '@/common/http.api.js'
import tool from '@/tool/tool.js'
import Vue from 'vue'
import global from '@/config/index.config.js'
import filters from './tool/filters.js'
// 1. 导入 store 的实例对象
import store from './store/store.js'
Vue.prototype.global = global
// 引入全局uView
import uView from 'uview-ui'
const jump = (url) => {
	uni.navigateTo({
		url: url
	})
}
Vue.use(uView);
Vue.config.productionTip = false
Vue.prototype.$api = api
Vue.prototype.$tool = tool
Vue.prototype.$msg = tool.msg
Vue.prototype.$jump = jump
Vue.prototype.$baseUrl = global.baseUrl
App.mpType = 'app'
// 添加全局filter
Object.keys(filters).map(v => {
    Vue.filter(v, filters[v])
})


// 引入uView对小程序分享的mixin封装
let mpShare = require('uview-ui/libs/mixin/mpShare.js');
Vue.mixin(mpShare)

const app = new Vue({
    ...App,
	// 2. 将 store 挂载到 Vue 实例上
	store
})
app.$mount()
